#include<stdio.h>
int main()
{
    char c;
    int a,b,m;
    c=100;
    
    while(1)
    {
        scanf("%d",&a);
        switch (a)
        {
        case 1 : c=c*2,printf("%d",c);break;
        case 2 : c=c/2;break;
        case 3 :
        
        default:
            break;
        }
    }


    return 0;
}